<template>
    <div>
        <van-nav-bar title="列表" />
        <router-link :to="'/detail/' + goods_id">
            <van-cell-group inset v-for="item in goodsData" :key="item.id">
                <van-cell :title="item.goods_name" :value="item.ggoods_big_logo" />
            </van-cell-group>
        </router-link>

    </div>
</template>

<script setup>
import { ref } from 'vue'
import { GoodsApi } from '@/api/api'

import { useRouter } from 'vue-router'
const router = new useRouter()

const goodsData = ref([])

GoodsApi().then((res) => {
    console.log(res);

    goodsData.value = res.data.message.goods
})


</script>

<style lang="scss" scoped></style>